<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="../Common/header.jsp"></jsp:include>




<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">	
		<section class="content-header">
		<h1>文档修改</h1>
		<ol class="breadcrumb">
			<li><a href="<c:url value="/Admin/index" />"><i
					class="fa fa-dashboard"></i> Home</a></li>

			<c:forEach items="${routers}" var="router">
				<li><i class="${router.icon}"></i><a href="javascript:void(0)">&nbsp&nbsp${router.name
						}</a></li>
			</c:forEach>

		</ol>
	</section>

	<section class="content">
		<div class="page-header"></div>
		<!-- 功能操作区域结束 -->
		<!-- 列表显示区域  -->
		<div class="box">
			<div class="box-header with-border">
				<h3 class="box-title"></h3>

				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool"
						data-widget="collapse">
						<i class="fa fa-minus"></i>
					</button>
					<button type="button" class="btn btn-box-tool" data-widget="remove">
						<i class="fa fa-remove"></i>
					</button>
				</div>
			</div>
			<div class="box-body">
				<div class="container-fluid">
    
    <form action="<c:url value='/document/updateDocument'/>" method="post">
    <div class="row">
    <div class="form-group col-xs-6">
								<label class="col-sm-2 control-label" for="title">文件名*：</label>
								<div class="col-sm-10">
									<input class="form-control" type="text" id="title" name="title" value="${document.title}" />
								</div>
							</div></div>
        <input type="hidden" name="id" value="${document.id}" />
    
        <!-- 加载编辑器的容器 -->
        <script id="editor" type="text/plain" name="content" style="width:100%;height:500px;"></script>
        <div class="row" style="margin-top:15px">
        <div class="col-xs-2">
        <input type="submit" class="btn btn-block btn-success btn-lg" value="保存"></button></div>
        <div class="col-xs-2"><button type="button" class="btn btn-block btn-success btn-lg">取消</button></div>
        </div>
    </form>
  
</div>
			</div>
		</div>

	</section>

</div>
<!-- /.content-wrapper -->
<jsp:include page="../Common/footer.jsp"></jsp:include>

	
<script type="text/javascript">

//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor');



UE.getEditor('editor').ready(function() {
    //this是当前创建的编辑器实例
    UE.getEditor('editor').setContent('${document.content}');
})
function getLocalData () {
    alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
}
</script>
